<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCoursePackagesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('course_packages', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name')->default('')->comment('套餐名');
            $table->timestamp('start_time') ->nullable()->comment('活动开始时间');
            $table->timestamp('end_time')   ->nullable()->comment('活动结束时间');
            $table->string('activity_group') ->default('all_user')->comment('活动对象,all_user全部用户');
            $table->tinyInteger('status')->default(0)->comment('状态');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
//        Schema::dropIfExists('course_packages');
    }
}
